import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home'
import TableDetail from '@/views/Home/TableDetail'
import Chart from '@/views/Home/Chart'
import LineChart from '@/views/Home/LineChart'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: "/home"
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children: [
      {
        path:'/home',
        redirect:"/home/tabledetail"
      },
      {
        path: '/home/tabledetail',
        component:TableDetail
      },{
        path:'/home/chart',
        component:Chart
      },{
        path:'/home/linechart',
        component:LineChart
      }
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
